package com.alex.xmlyfm.entities.discoverrecommend;

/**
 * Created by
 * Author: alex
 * Email:
 * Date: 15-10-22.
 */

import com.alex.xmlyfm.entities.Parsable;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * 一个听单数据实体
 */
public class SpecialItem implements Parsable{

    private int columnType;
    private long specialId;
    private String title;
    private String subtitle;
    private String footnote;
    private String coverPath;
    private String contentType;


    public int getColumnType() {
        return columnType;
    }

    public long getSpecialId() {
        return specialId;
    }

    public String getTitle() {
        return title;
    }

    public String getSubtitle() {
        return subtitle;
    }

    public String getFootnote() {
        return footnote;
    }

    public String getCoverPath() {
        return coverPath;
    }

    public String getContentType() {
        return contentType;
    }

    @Override
    public void parseJSON(JSONObject json) throws JSONException {

        if (json != null) {
            specialId = json.getLong("specialId");
            columnType = json.optInt("columnType",1);
            subtitle = json.optString("subtitle");
            title = json.getString("title");
            footnote = json.optString("footnote");
            coverPath = json.optString("coverPath");
            contentType = json.optString("contentType");
        }

    }
}
